﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;

namespace ThreadEyePro
{
    public partial class FormAddThread : Form
    {
        public int threadId = 0;
        public FormAddThread()
        {
            InitializeComponent();
        }

        private void buttonSubscribe_Click(object sender, EventArgs e)
        {
            string tid = textBoxThreadId.Text.Trim();
            Match m = Regex.Match(tid, "^\\d+(\\.\\d+)?$");
            if (!m.Success)
            {
                MessageBox.Show("Please enter thread id in numeric format only!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                threadId = Convert.ToInt32(tid);
                DialogResult = DialogResult.OK;
            }
        }

    }
}
